<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/include/common.jsp"%>
<c:if test="${dp.limit>0}">
	<div class="ws-bar page" form="${form}">
		<span>[每页记录数：${dp.limit}]
			总页数/总记录数：${dp.totalPage}/${dp.totalRecord}</span>
		<div style="float: right;">
			<button icon="seek-first" text="false" value="1">第一页</button>
			<button icon="seek-prev" text="false"
				value="${dp.currentPage >1 ? (dp.currentPage-1) : 1}">前一页</button>
			<span class="ws-group"> <c:set var="beginPage"
					value="${dp.currentPage <=3 ? 1 : dp.currentPage-3}" /> <c:set
					var="endPage"
					value="${dp.totalPage >= dp.currentPage+3 ? dp.currentPage+3 : dp.totalPage}" />
				<c:if test="${beginPage!=1}">
					<button disabled="disabled">...</button>
				</c:if> <c:forEach begin="${beginPage}" end="${endPage }"
					varStatus="states">
					<c:choose>
						<c:when test="${states.index == dp.currentPage}">
							<button value="${states.index}" disabled="disabled">${states.index}</button>
						</c:when>
						<c:otherwise>
							<button value="${states.index}">${states.index}</button>
						</c:otherwise>
					</c:choose>
				</c:forEach> <c:if test="${endPage!=dp.totalPage}">
					<button disabled="disabled">...</button>
				</c:if>
			</span>
			<button text="false" icon="seek-next"
				value="${dp.totalPage > dp.currentPage ? (dp.currentPage+1) : dp.totalPage}">下一页</button>
			<button text="false" icon="seek-end" value="${dp.totalPage}">最后页</button>
		</div>
	</div>
</c:if>